import java.util.Scanner;

class Animal {
    public String name;
    public int age;

    public void setAnimal(Animal this, String name, int age) {
        this.name = name;
        this.age = age;
    }

    @Override
    public String toString() {
        return "Animal{" +
                "name='" + name + '\'' +
                ", age=" + age +
                '}';
    }
}

public class Main {

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);

        int n = in.nextInt();
        int[] arr = new int[n];
        int answer = 0;
        for(int i = 0; i < n; i++) {
            arr[i] = in.nextInt();
            answer ^= arr[i];
        }
        System.out.println(answer);
    }
    public static void main6(String[] args) {
        Animal animal1 = new Animal();
        Animal animal2 = new Animal();
        animal1.setAnimal("十七",5);
        animal2.setAnimal("阿布",2);
        System.out.println(animal1);
        System.out.println(animal2);
    }





    public static int multiply(int x, int y) {
        return x * y;
    }

    public static double add(double x, int y) {
        return x + y;
    }
    public static double add(int x, double y) {
        return x + y;
    }
    public static void swap(int x, int y) {
        int tmp = x;
        x = y;
        y = tmp;
    }

    public static void doubleArr1(int[] arr) {
        for (int i = 0; i < arr.length; i++) {
            arr[i] *= 2;
        }
    }


    public static void doubleArr(int[] arr) {
        int[] arr2 = new int[arr.length];
        for (int i = 0; i < arr.length; i++) {
            arr2[i] = arr[i] * 2;
        }
        arr = arr2;
    }

    public int a;
//    public static void main5(String[] args) {
//        Animal animal = new Animal();
//        Main main1 = new Main();
//        animal.func();
//        System.out.println(animal.age);
//        System.out.println(main1.a);
//        Animal.func();
//    }
    public static void main4(String[] args) {
        int[] arr = {1,3};
        System.out.println("操作前：");
        for (int x:arr) {
            System.out.print(x + "  ");
        }
        System.out.println();

        System.out.println("操作后：");
        doubleArr(arr);
        for (int x:arr) {
            System.out.print(x + "  ");
        }
    }








    public static void main3(String[] args) {
        int[] arr = {1,3};
        System.out.println("操作前：");
        for (int i = 0; i < arr.length; i++) {
            System.out.print(arr[i] + " ");
        }
        System.out.println();

        doubleArr(arr);
        System.out.println("操作后：");
        for (int i = 0; i < arr.length; i++) {
            System.out.print(arr[i] + " ");
        }
    }

    public static void main2(String[] args) {
        int a = 1;
        int b = 3;
        System.out.println("交换前:");
        System.out.print("a = "+a);
        System.out.print(", b = "+b);
        swap(a, b);
        System.out.println();
        System.out.println("交换后:");
        System.out.print("a = "+a);
        System.out.print(", b = "+b);
    }

    public static void main1(String[] args) {
        int n = multiply(3, 4);
        System.out.println(n);
    }
}
